package com.ye.zcswzlms.mapper;

import com.ye.zcswzlms.entity.Users;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 叶德辉
 * @since 2020-12-08
 */
@Mapper
@Repository
public interface UsersMapper extends BaseMapper<Users> {
    @Select("update users set userMark = 1 where stuNo=#{stuNo}")
    void addUser(@Param("stuNo")String stuNo);

    @Select("select stuNo,password,passwordSalt from users where stuNo = #{stuNo}")
    Users getByStuNo(@Param("stuNo") String stuNo);
}
